package com.example.configuration.core;

import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

public class PropertyFileConfiguration extends BaseConfiguration<String> {

	private Map<String, Pair<String>> pairs = new TreeMap<>();

	@Override
	public void removeAllPairs() {
		pairs.clear();
	}

	@Override
	public boolean isEmpty() {
		return pairs.isEmpty();
	}

	@Override
	public boolean containsKey(String key) {
		return pairs.containsKey(key);
	}

	@Override
	public Iterator<String> getKeys() {
		return pairs.keySet().iterator();
	}

	@Override
	public void addPair(Pair<String> pair) {
		pairs.put(pair.getKey(), pair);
	}

	@Override
	public void updatePair(Pair<String> pair) {
		pairs.put(pair.getKey(), pair);
	}

	@Override
	public void removePair(String key) {
		pairs.remove(key);
	}

	@Override
	public Pair<String> getPair(String key) {
		return pairs.get(key);
	}

	@Override
	public Pair<String>[] getPairArray(String[] keys) {
		return null;
	}

	@Override
	public List<Pair<String>> getPairList(String[] keys) {
		return null;
	}
}
